{extend name="common/base" /}
{block name="css"}
<style>
    .profile-avatar-container {
        position: relative;
        width: 100px;
        margin: 0 auto;
    }

    .profile-avatar-container .profile-user-img {
        width: 130px;
        height: 130px;
    }

    .profile-avatar-container .profile-avatar-text {
        display: none;
    }

    .profile-avatar-container:hover .profile-avatar-text {
        display: block;
        position: absolute;
        height: 130px;
        width: 130px;
        background: #444;
        opacity: .6;
        color: #fff;
        top: 0;
        left: 0;
        line-height: 100px;
        text-align: center;
    }

    .profile-avatar-container button {
        position: absolute;
        top: 0;
        left: 0;
        width: 130px;
        height: 130px;
        opacity: 0;
    }
</style>
{/block}
{block name="content"}
<div class="layui-row layui-col-space12">
    <div class="layui-col-md4">
        <div class="layui-field-box">
            <form class="layui-form" action="" method="post">
                <div class="layui-form-item">
                    <input type="hidden" name="row[avatar]" value=""/>
                    <div class="profile-avatar-container">
                        <img class="profile-user-img layui-nav-img plupload" id="avatar"
                             src="__UPLOAD__{:auth()->info('avatar')}" alt="上传图像">
                        <div class="profile-avatar-text layui-nav-img"> 点击编辑</div>
                        <button id="plupload-avatar" type="button" class="plupload">
                            <i class="fa fa-upload"></i> 上传图片
                        </button>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">账号</label>
                    <div class="layui-input-block">
                        <input type="text" value="{:auth()->info('account')}" disabled placeholder="请输入账号名"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">昵称</label>
                    <div class="layui-input-block">
                        <input type="text" name="row[nick_name]" value="{:auth()->info('name')}" lay-verify="required"
                               placeholder="请输入管理员昵称" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item ">
                    <label class="layui-form-label">旧密码</label>
                    <div class="layui-input-block">
                        <input type="password" name="row[old_pwd]" value="" placeholder="请输入旧密码" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item ">
                    <label class="layui-form-label">新密码</label>
                    <div class="layui-input-block">
                        <input type="password" name="row[new_pwd]" value="" placeholder="请输入新密码" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item ">
                    <label class="layui-form-label">确认密码</label>
                    <div class="layui-input-block">
                        <input type="password" name="row[confirm_pwd]" value="" placeholder="请输入确认密码"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <p>
                        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="formUpdate">
                            确定
                        </button>
                        <button type="reset" class="layui-btn layui-btn-sm layui-btn-danger">重置</button>
                    </p>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}